1. Field of the Invention
The present invention relates to methods for determining the quality of a network and an apparatus for use therewith.
2. Description of the Related Art
The present invention relates to an apparatus and methods for determining the quality of a network. In this specification, “the quality of a network” means the quality of data input to the measuring apparatus for determining the network quality, namely the quality of data passing through branch devices on the network. The quality of data means, for example, the throughput, the goodput, packet losses, response times, transaction-duration time, the positions of the occurrences of packet losses, etc.
Hereinafter, for easier understanding, network-quality determining techniques will be described by exemplifying TCP (Transmission Control Protocol).
There are some techniques known as techniques for determining the quality of TCP communications. For example, these techniques are described in JP-A No. 2001-94573. (Document 1) and a paper entitled “Application Level Quality Estimation based on Multi-Layer protocol Measurement and Analysis” i by M. kamiya et al., in Technical Report of IEICE, NS2003-162 CQ2003-79 TM 2003-40 (2003-11) (Document 2).
First, with reference to FIG. 1 and FIG. 2, there will be described the technique for determining the throughput, the goodput and packet losses, described in Document 1.
FIG. 1 is a view illustrating an aspect of the application of the techniques described in Documents 1 and 2, and FIG. 2 is a flow chart for explaining the operation of the technique described in Document 1. The technique described in Document 1 utilizes the following mechanism. Namely, in general, when the serial number (SN) of TCP is monotonously increased, there has been no data loss during communications and, only when a data loss is detected and thus a retransmission process is executed, the SN is decreased.
As illustrated in FIG. 1, when the quality of data communications between a communication terminal 2 and a communication terminal 3 are determined, a branch device 4 and a branch device 5 are installed on the communication link. These branch devices 4, 5 are connected to a measuring apparatus 1 for determining the network quality. The measuring apparatus 1 captures communication data to be measured through the branch devices 4, 5. By capturing data, the measuring apparatus 1 starts determination of the quality.
As illustrated in FIG. 2, the measuring apparatus 1 captures packets and classifies the captured packets to flows, wherein each flow has the same transmission/reception IP address and the same TCP port number (step A1). Then, steps A-2 to A-6 are executed for each flow.
The measuring apparatus 1 determines the amount of captured data, for each flow. The measuring apparatus 1 adds the amount of the newly captured data (=IP packet length) to the amount of data which has been passed though the apparatus 1 to determine the cumulative amount of data which has passed therethrough, for each data flow (step A-2).
Then, the measuring apparatus 1 reads the sequence number (hereinafter, referred to as “SN) existing in the TCP protocol header of the captured data. It is assumed that the read value is “X” (step A-3).
Subsequently, the measuring apparatus 1 makes a comparison between the maximum value (which is referred to as Y) out of SNs captured in the past at the same flow and the value X read at the step A-3 (step A-4).
If the comparison at the step A-4 reveals that X is greater than Y, the SN of the current captured data is greatest in the SNs which have been read for the same flow, and therefore the measuring apparatus substitutes the current X for Y and ends the process (step A-5). Then, when next data is inputted, the measuring apparatus re-starts the process at the step A-1.
If the comparison at the step A-4 reveals that X is not greater than Y, the measuring apparatus increments the number of packet losses by one. Further, the measuring apparatus adds the amount of current captured data (=IP packet length) to the amount of packet losses (step A6).
The accumulated packet size determined at the step A-2 at the end of communication is the amount of data received by the measuring apparatus. By converting this value into a value per unit time, “the throughput” can be obtained. Further, the number of packet losses and the amount of packet losses, which are counted at the step A6, indicate the quality relating to “packet losses”. Further, the amount of normally-communicated data minus the amount of packet losses indicates the amount of data received by the communication partner. The amount of data received by the communication partner per unit time indicates the goodput.
Next, with reference to FIG. 3 to FIG. 8, the technique described in Document 2 will be described.
Document 2 describes a technique for detecting the occurrences of packet losses in the TCP three-way hand shake (data-communication establishing process) and identifying the positions of the occurrences of packet losses.
When no packet loss has occurred during TCP data communication establishing process, data at the same connection has a signal flow (CASE 0) as illustrated in FIG. 3. In this CASE 0, the measuring apparatus 1 receives packets in the order of “SYN (Synchronous)”, “SYN+ACK (Acknowledgement)”, “ACK”, “GET” and “RST (Reset)”. However, in the event of the occurrence of a packet loss during, for example, the data communication establishing process, the order of reception and the number of receptions of these packets will be different from those of CASE 0. The following CASEs 1 to 5 may occur:
CASE 1 [the order of detection: SYN, SYN, SYN+ACK, ACK, GET,                RST] (FIG. 4)        
CASE 2 [the order of detection: SYN, SYN+ACK, ACK, GET, RST]                (FIG. 5)        
CASE 3 [the order of detection: SYN, SYN+ACK, SYN+ACK, ACK,                GET, RST] (FIG. 6)        
CASE 4 [the order of detection: SYN, SYN+ACK, SYN, SYN+ACK,                ACK, GET, RST] (FIG. 7)        
CASE 5 [the order of detection: SYN, SYN+ACK, GET, RST]                (FIG. 8)        
The technique of Document 2 determines which of cases 1 to 5 is consistent with the order and number of receptions of these packets of “SYN”, “SYN+ACK”, “ACK”, “GET” and “RST”, detects the occurrences of packet losses and identifies the positions of the occurrences of packet losses, during data-communication establishment process.
FIG. 3 illustrates CASE 0, wherein the measuring apparatus 1 receives packets in the order of [SYN, SYN+ACK, ACK, GET, RST]. Since this is the ideal order for the data establishing process, the measuring apparatus 1 determines that no packet loss has occurred. Here, it is required that the intervals between receptions of the packets are within a predetermined value.
FIG. 4 illustrates CASE 1, wherein the measuring apparatus 1 receives packets in the order of [SYN, SYN, SYN+ACK, ACK, GET, RST]. This CASE 2 has two types of sub cases. One of them is a sub case illustrated in the left side of FIG. 4 and the other one is a sub case illustrated in the right side of FIG. 4. The case of the left side of FIG. 4 represents a sub case where the “SYN” data transmitted at first from the communication terminal 2 to the communication terminal 3 has been lost between the measuring apparatus 1 and the communication terminal 3. The right side of FIG. 4 represents a sub case where the “SYN+ACK” data transmitted from the communication terminal 3 to the communication terminal 2 in response to the SYN data received by the communication terminal 3 has been lost between the communication terminal 2 and the measuring apparatus 1. In any of the sub cases, the communication terminal 2 cannot receive the response (“SYN+ACK”) to the transmitted “SYN” within a predetermined time and therefore retransmits “SYN”. In any of the sub cases, when data is received in this order, it can be determined that a packet has been lost between the measuring apparatus 1 and the communication terminal 3.
FIG. 5 illustrates CASE 2, wherein the measuring apparatus 1 receives packets in the order of [SYN, SYN+ACK, ACK, GET, RST]. This CASE 2 represents a case where the “SYN+ACK” data that the communication terminal 3 transmitted after the reception of the “SYN” data from the communication terminal 2 has been lost between the measuring apparatus 1 and the communication terminal 3. In FIG. 5, the communication terminal 3 cannot receive the “ACK” from the communication terminal 2 within a predetermined time after the transmission of the first “SYN+ACK”, and therefore retransmits the “SYN+ACK”, and the retransmitted “SYN+ACK” is received by the measuring apparatus 1 and the communication terminal 2.
The CASE 2 is a case where the communication is continued by the retransmission of the “SYN+ACK” data from the communication terminal 3. Although this order of reception is the same as that of CASE 0 of FIG. 3, the interval between the arrivals of the “SYN” data and the “SYN+ACK” data in CASE 2 is larger than that in the CASE 0, and therefore the measuring apparatus 1 can easily distinguish between CASE 0 and CASE 2.
FIG. 6 illustrates CASE 3, wherein the measuring apparatus 1 receives packets in the order of [SYN, SYN+ACK, SYN+ACK, ACK, GET, RST]. In this CASE3, a packet has been lost between the communication terminal 2 and the measuring apparatus 2. This CASE 3 has two types of sub cases. One of them is a sub case illustrated in the left side of FIG. 6 and the other one is a sub case illustrated in the right side of FIG. 6.
The sub-case of the left side of FIG. 6 represents a case where the “SYN+ACK” data that the communication terminal 3 transmitted after the reception of the “SYN” data from the communication terminal 2 has been lost between the communication terminal 2 and the measuring apparatus 1 after passing through the measuring apparatus 1.
The sub-case of the right side of FIG. 6 represents a sub-case where the “ACK” data that the communication terminal 2 transmitted after the reception of the “SYN+ACK” data from the communication terminal 3 has been lost between the communication terminal 2 and the measuring apparatus 1 before passing through the measuring apparatus 1.
In any of the sub cases, the communication terminal 3 retransmits the “SYN+ACK” data. When the measuring apparatus 1 receives packets in the order of [SYN, SYN+ACK, SYN+ACK, ACK, GET, RST] as described above, the measuring apparatus 1 can determine that a packet loss has occur between the communication terminal 2 and the measuring apparatus 1.
FIG. 7 illustrates CASE 4, wherein the measuring apparatus 1 receives packets in the order of [SYN, SYN+ACK, SYN, SYN+ACK, ACK, GET, RST]. In the CASE 4, a packet has been lost between the communication terminal 2 and the measuring apparatus 1. In the CASE 4, the “SYN+ACK” data that the communication terminal 3 transmitted in response to the “SYN” data from the communication terminal 2 has been lost between the communication terminal 2 and the measuring apparatus 1, after passing through the measuring apparatus 1. The communication terminal 2 cannot receive the response from the communication terminal 3 after a lapse of a constant time and thus sends the SYN data again. In CASE 4, the measuring apparatus 1 can determine that a packet has been lost between the communication terminal 2 and the measuring apparatus 1.
FIG. 8 illustrates CASE 5, wherein the measuring apparatus 1 receives packets in the order of [SYN, SYN+ACK, ACK, GET, RST]. In CASE 5, the “ACK” data that the communication terminal 2 transmitted in response to the “SYN+ACK” data from the communication terminal 3 has been lost between the communication terminal 2 and the measuring apparatus 1. In CASE 5, the measuring apparatus 1 can determine that a packet has been lost between the communication terminal 2 and the measuring apparatus 1.
The technique of the aforementioned Document 1 may falsely detect packet losses for data which was not suffered from packet losses. Consequently, the technique of the aforementioned Document 1 may estimate packet losses to be higher than the actual value. The causes thereof will be described with reference to FIG. 9.
The prior-art technique described in Document 1 detects packet losses on the basis of only the order of serial numbers (SNs), of received packets. However, data which was transmitted from the communication terminal 2 at an earlier timing may arrive at the measuring apparatus 1 after the arrival of data which was transmitted from the communication terminal 2 at a later timing than that of the aforementioned data, depending on the condition of communication. For example, in the case of FIG. 9, data with an SN of 2000 may be supplied to the measuring apparatus 1 after data transmitted at a later timing (data with an SN of 3000 in FIG. 9) is supplied to, the measuring apparatus 1. In such a case, the data transmitted at an earlier timing (the data with the SN 2000 in FIG. 9) is determined to be packet loss, since it has an SN smaller than the maximum SN (3000 in FIG. 9) detected by the measuring apparatus 1 in the past, even though it arrived at the communication terminal 3 without causing a packet loss.
Further, the technique of Document 1 may underestimate the quality of the goodput, which is the amount of data received by the communication partner per unit time. The goodput is the amount of data reached the communication partner and can be calculated as “the amount of data transmitted from the transmission terminal minus the amount of packet losses”. However, the technique of Document 1 may estimate the amount of packet losses to be higher than the actual amount, thus estimating “the amount of data transmitted from the transmission terminal minus the amount of packet losses” to be lower than the actual value.
Further, the technique of the aforementioned Document 2 can determine the positions of the occurrences of packet losses only during the data-communication establishing process (three-way hand shake). This is because the technique of Document 2 determines the positions of the occurrences of packet losses by using the order of arrivals of packets during the data-communication establishing process. Accordingly, the technique of Document 2 does not take account of the order of data communications after the communication process has been established. Thus, in the event that a packet loss occurs during data communications between the communication terminals after the completion of the data communication establishing process, the measuring apparatus 1 cannot detect the packet loss.
Furthermore, the technique of Document 2 may not accurately detect the positions of the occurrences of packet losses even during the data-communication establishing process. This technique can only determine whether a packet loss has occurred between the communication terminal 2 and the measuring apparatus 1 or between the measuring apparatus 1 and the communication terminal 3. In the case of the former packet loss, the technique cannot determine whether the packet loss occurred during the communication from the communication terminal 2 to the measuring apparatus 1 (the sub-case of the right side of FIG. 6) or during the communication from the measuring apparatus 1 to the communication terminal 2 (the sub-case of the left side of FIG. 6). Similarly, in the case of the latter packet loss, the technique cannot determine whether the packet loss occurred during the communication from the measuring apparatus 1 to the communication terminal 3 (the sub-case of the left side of FIG. 4) or during the communication from the communication terminal 3 to the measuring apparatus 1 (the sub-case of the right side of FIG. 4).